#ifndef _PRIMITIVA_H_
#define _PRIMITIVA_H_

#include <iostream>

#define PI 3.14159265

class Primitiva
{
public:
    Primitiva()                 : x0(0), y0(0), grados(0), red(0.0), green(0.0), blue(0.0), isSelectionRect(false)  { };
    Primitiva(int x, int y)     : x0(x), y0(y), grados(0), red(0.0), green(0.0), blue(0.0), isSelectionRect(false)  { };
    virtual ~Primitiva()                    { };
    
    virtual void Dibujar();
    virtual void Move(int x, int y);
    virtual void Agrupar();
    virtual void Desagrupar();

    int GetX() const    { return x0; };
    int GetY() const    { return y0; };
    int GetGrados() const { return grados; };
    double GetRed() const { return red; };
    double GetGreen() const { return green; };
    double GetBlue() const { return blue; };

    void SetX(int x)    { x0 = x; };
    void SetY(int y)    { y0 = y; };
    void SetGrados(int grados) { this->grados = grados; };
    void SetRed(double r) { red = r; };
    void SetGreen(double g) { green = g; };
    void SetBlue(double b) { blue = b; };
    void SetColor(double r, double g, double b) { red = r; green = g; blue = b;};

    bool IsSelectionRect()  { return isSelectionRect; }
    void setSelectionRect() { isSelectionRect = true; }
    void unsetSelectionRect() { isSelectionRect = false; }

private:
    int x0,y0,grados;
    double red,green,blue;      //Los doubles son de 0.0(ausencia de color) a 1.0(no ausencia de color)
    bool isSelectionRect;

};

#endif // _PRIMITIVA_H_
